package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zksk.common.core.web.domain.BaseEntity;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 用户资质证书表
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-14
 */
@Data
@Accessors(chain = true)
@TableName("platform_fact_member_credential")
@ApiModel(value = "MemberCredential对象", description = "用户资质证书表")
public class MemberCredential extends BaseEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("证书编号")
    @TableField("credential_code")
    private String credentialCode;

    @ApiModelProperty("证书名称")
    @TableField("credential_name")
    private String credentialName;

    @ApiModelProperty("用户编号")
    @TableField("member_id")
    private Long memberId;

    @ApiModelProperty("发证日期")
    @TableField("`time`")
    private LocalDateTime time;

    @ApiModelProperty("证书有效期")
    @TableField("expiration_time")
    private LocalDateTime expirationTime;

    @ApiModelProperty("发证机关")
    @TableField("grant_company")
    private String grantCompany;

    @ApiModelProperty("证书扫描文件")
    @TableField("scan_file")
    private String scanFile;

    @ApiModelProperty("资质行业/专业类别")
    @TableField("credential_type")
    private String credentialType;

    @ApiModelProperty("资质等级")
    @TableField("credential_level")
    private String credentialLevel;

    @ApiModelProperty("删除标识")
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;


    public static final String ID = "id";

    public static final String CREDENTIAL_CODE = "credential_code";

    public static final String CREDENTIAL_NAME = "credential_name";

    public static final String MEMBER_ID = "member_id";

    public static final String TIME = "time";

    public static final String EXPIRATION_TIME = "expiration_time";

    public static final String GRANT_COMPANY = "grant_company";

    public static final String SCAN_FILE = "scan_file";

    public static final String BUS_TYPE = "bus_type";

    public static final String LEVEL = "level";

    public static final String DEL_FLAG = "del_flag";

    public static final String CREDENTIAL_TYPE = "credential_type";

    public static final String CREDENTIAL_LEVEL = "credential_level";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
